(bind e1 "<Return>" (lambda () (load-file t Wsearch-name) (focus e2)))
(bind e2 "<Return>" (lambda () (search t Wsearch-string tag)))
(pack f1 f2 t :side "top")
;; Fill in text widget and pack it
(text-insert t "end" "This window demonstrates how to use the tagging facilities in text widgets to implement a searching mechanism. First, type a file name in the top entry, then type <Return> or click on \"Load File\". Then type a string in the lower entry and type <Return> or click on \"Highlight\". This will cause all of the instances of the string to be tagged with the same tag, and it will arrange for the tag's display attributes to change to make all of the strings blink.")
(pack t :side "top" :expand #t :fill "both"))
;; Toggle the bg and fg colors of the search tag
(toggle 500 tag))
;; Reste global varaiable (for multiple executions)